﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>

    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="red">一：<a href="http://www.cyqdata.com/cyqdata" style="color: rgb(120, 175, 211); text-decoration: none;">XHtmlAction</a>&nbsp; 类的说明</font></strong></p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <strong>使用此类，可以轻松操作Xml/Html。</strong></div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="red">二：<a href="http://www.cyqdata.com/cyqdata" style="color: rgb(120, 175, 211); text-decoration: none;">XHtmlAction</a>&nbsp;使用说明：</font></strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>1：实例化：</strong></p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <strong><font color="teal">XHtmlAction</font><span class="Apple-converted-space">&nbsp;</span>doc=new<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XHtmlAction</font>(...);</strong></div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="blue">public</font><span class="Apple-converted-space">&nbsp;</span>XHtmlAction()//默认构造函数[操作无名称空间的Xml]</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>XHtmlAction(<font color="blue">bool</font><span class="Apple-converted-space">&nbsp;</span>forHtml,bool noClone)//参数forHtml:true操作Html，false操作xml;noClone参数：true时只读，false可写（默认）</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>XHtmlAction(<font color="blue">string</font><span class="Apple-converted-space">&nbsp;</span>nameSpaceUrl)//操作名称空间的Xml</strong></p>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>2：Xml/Html加载：</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void LoadXml(string xml)//从字符串加载</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>bool Load(string absFilePath)//从文件路径加载</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>bool Load(string absFilePath, XmlCacheLevel level)//带设置xml/html缓存级别</strong></p>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="red">示例代码：</font></strong></p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <strong><font color="#008080">XHtmlAction</font><span class="Apple-converted-space">&nbsp;</span></strong>doc =<span class="Apple-converted-space">&nbsp;</span><font color="blue">new</font><span class="Apple-converted-space">&nbsp;</span><strong><font color="#008080">XHtmlAction</font><span class="Apple-converted-space">&nbsp;</span></strong>(<font color="blue">true</font>);//操作html<br />
        if (doc.Load(Server.MapPath(&quot;/html/index.html&quot;),<span class="Apple-converted-space">&nbsp;</span><font color="teal">XmlCacheLevel</font>.Hour))<br />
        {<br />
        &nbsp;&nbsp;//加载html成功，并缓存html 1小时<br />
        }</div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>3：查询</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>3.1：单结点查询：</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>GetByID(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id)//根据ID查找结点<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>GetByID(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id,<span class="Apple-converted-space">&nbsp;</span><font color="teal">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode)//在parentNode节点下根据ID找结点<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>GetByName(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>name)//根据Name查找结点<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>GetByName(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>name,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode))<br />
        <br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>Get(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attr,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>value,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode)//根据标签，属性及属性值和是否带父节点查找一个结点。</strong><div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="red">示例：</font></strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>xml示例节点：</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>&lt;p id=&quot;pID&quot;&gt;这里有pID&lt;/p&gt;&lt;div id=&quot;divID&quot; &gt;&lt;p id=&quot;pID&quot;&gt;pID又来一个&lt;/p&gt;&lt;/div&gt;</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>node = doc.GetByID(&quot;pID&quot;, doc.GetByID(&quot;divID&quot;));//获取里面的ID节点</strong></p>
    </div>
    </strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>3.2：列表结点查询：</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="teal">XmlNodeList</font><span class="Apple-converted-space">&nbsp;</span>GetList(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag)<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNodeList</font><span class="Apple-converted-space">&nbsp;</span>GetList(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode)<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNodeList</font><span class="Apple-converted-space">&nbsp;</span>GetList(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attr)<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNodeList</font><span class="Apple-converted-space">&nbsp;</span>GetList(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attr,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode)<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNodeList</font><span class="Apple-converted-space">&nbsp;</span>GetList(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attr,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>value)<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNodeList</font><span class="Apple-converted-space">&nbsp;</span>GetList(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attr,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>value,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode)</strong><div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="#ff0000">示例：</font></strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><font color="#ff0000"><strong><font color="black">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <font color="#ff0000">
        <p style="margin: 10px auto; text-indent: 0px;">
            <font color="black">xml示例节点：</font></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <font color="black">&lt;p id=&quot;pID&quot;&gt;这里有pID&lt;/p&gt;&lt;div id=&quot;divID&quot; &gt;&lt;p id=&quot;pID&quot;&gt;pID又来一个&lt;/p&gt;&lt;/div&gt;</font></p>
        </font>
        <p style="margin: 10px auto; text-indent: 0px;">
            <font color="#008080">XmlNodeList</font><span class="Apple-converted-space">&nbsp;</span>nodeList = doc.GetList(&quot;p&quot;,&quot;id&quot;,&quot;pid&quot;);//获取所有p的节点</p>
    </div>
    </font></strong></font></strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>4：创建结点：</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>CreateNode(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>text, params<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font>[] attrAndValue)</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void CreateNodeTo(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>tag,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>text, params string[] attrAndValue)</strong></p>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="#ff0000">示例：</font></strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><font color="#ff0000"><strong><font color="black">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <p style="margin: 10px auto; text-indent: 0px;">
            xml示例节点：</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            一开始节点：&lt;div id=&quot;divID&quot;&gt;&lt;/div&gt;</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <font color="#000000">代码创建：doc.CreateNodeTo(doc.GetByID(&quot;divID&quot;), &quot;p&quot;, &quot;pID又来一个&quot;, &quot;id&quot;, &quot;pID&quot;);</font></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            创建后变成：&lt;div id=&quot;divID&quot; &gt;&lt;p id=&quot;pID&quot;&gt;pID又来一个&lt;/p&gt;&lt;/div&gt;</p>
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    </font></strong></font></strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>5：添加结点：</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void AppendNode(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>childNode)</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void AppendNode(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>childNode,<span class="Apple-converted-space">&nbsp;</span><font color="blue">int</font><span class="Apple-converted-space">&nbsp;</span>position)//position为将childNode放在parentNode的第N个子节点之后</strong></p>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>6：删除结点：</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Clear(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>node)//保留节点，只清除内容和属性<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Remove(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>node)//删除节点<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Remove(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id)//根据节点ID删除节点<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void RemoveChild(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id, int index)//移除某ID节点下的第N个子节点<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void RemoveChild(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>node, int index)//移除某节点下的第N个子节点<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void RemoveAttrList(params<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font>[] attrNames)//移除整个文档的指定属性</strong><div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>7：结点交互|替换|插入[前后],[支持在多个不同的Document节点中操作]</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void InterChange(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>xNodeFirst,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>xNodeLast)//两节点互换位置</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void ReplaceNode(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>newNode,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>oldNode)//节点替换</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void InsertAfter(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>newNode,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>refNode)//将newNode插入到refNode之后</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void InsertBefore(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>newNode,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>refNode)//将newNode插入到refNode之前</strong></p>
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>8：节点判断：</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>bool Contains(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id)//是否存在某ID节点</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>bool Contains(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>parentNode)//在parentNode下是否存在某ID节点</strong></p>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>9：属性操作</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>bool HasAttr(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>nodeID,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attrName)//某节点是否存在某属性</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>bool HasAttr(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>node,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attrName)</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>string GetAttrValue(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>nodeID,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attrName, params string[] defaultValue)//获取某节点的属性值，并允许设置默认值</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>string GetAttrValue(XmlNode node,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>attrName, params string[] defaultValue)</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void RemoveAttr(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>nodeID, params<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font>[] attrNames)//移除节点指定属性</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void RemoveAttr(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>node, params<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font>[] attrNames)</strong></p>
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="black">10：保存为xml/html功能</font></strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        方法原型：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Save()//保存并替换原始加载文件</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Save(string fileName)//保存到指定的文件路径</strong></p>
    </div>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="red">三：与CYQ.Data.Table的交互功能</font></strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>1：原生的赋值操作</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>方法原型：</strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Set(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>value)//为ID节点的InnerXml属性赋值<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Set(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>id,<span class="Apple-converted-space">&nbsp;</span><font color="teal">SetType</font><span class="Apple-converted-space">&nbsp;</span>setType, params<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font>[] values)//为ID节点的setType[不同属性]赋值，如果是A链接，可赋多个值。<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void Set(<font color="#008080">XmlNode</font><span class="Apple-converted-space">&nbsp;</span>node,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">SetType</font><span class="Apple-converted-space">&nbsp;</span>setType, params<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font>[] values)</strong></div>
    </strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="red">示例：</font></strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>原始：&lt;a id=&quot;aID&quot;&gt;这是一个原始A链接&lt;/id&gt;</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>doc.Set(&quot;aID&quot;, SetType.A,&quot;这是A链接&quot;,&quot;<a href="http://www.cyqdata.com%22,%22_blank/" style="color: rgb(120, 175, 211); text-decoration: none;">http://www.cyqdata.com%22,%22_blank/</a>&quot;);</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>结果：&lt;a id=&quot;aID&quot; href=<a href="http://www.cyqdata.com/" style="color: rgb(120, 175, 211); text-decoration: none;">http://www.cyqdata.com/</a><span class="Apple-converted-space">&nbsp;</span>target=&quot;_blank&quot;&gt;这是A链接&lt;/id&gt;</strong></p>
    </div>
    </strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>2：与MDataRow的交互[ID=任意三个字母前缀+字段名称]</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>方法原型：</strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void LoadData(<font color="teal">MDataRow</font><span class="Apple-converted-space">&nbsp;</span>row)//加载行数据<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void SetFor(<font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>id)//将row的数据赋给ID节点的InnerXml属性<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void SetFor(<font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>id,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">SetType</font><span class="Apple-converted-space">&nbsp;</span>setType)//将row的数据赋给ID节点的指定属性<br />
        <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void SetFor(<font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>id,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">SetType</font><span class="Apple-converted-space">&nbsp;</span>setType, params<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><font color="#000000">[] values)//最后参数允许格式化值</font></strong></div>
    </strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong><font color="red">示例：</font></strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>原始&lt;span id=&quot;labHits&quot;&gt;点击&lt;/span&gt;</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>doc.SetFor(&quot;labHits&quot;, SetType.InnerText, ValueReplace.Source + &quot;(&quot; + ValueReplace.New + &quot;)&quot;);</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>结果：&lt;span id=&quot;labhits&quot;&gt;点击(12)&lt;/span&gt;</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="teal">ValueReplace</font>.Source：指原来节点属性的值</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="teal">ValueReplace</font>.New： 指数据库的值</strong></p>
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    </strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>3：与MDataTable的交互</strong></p>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>方法原型：</strong></p>
    <strong style="color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong><font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void LoadData(<font color="teal">MDataTable</font><span class="Apple-converted-space">&nbsp;</span>table)//加载表格</strong></p>
        <p style="margin: 10px auto; text-indent: 0px;">
            <strong>//SetForeach将ID节点复制并循环<br />
            <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void SetForeach(<font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>id,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">SetType</font><span class="Apple-converted-space">&nbsp;</span>setType, params object[] formatValues)<br />
            <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font>void SetForeach(<font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>id,<span class="Apple-converted-space">&nbsp;</span><font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>text, params object[] formatValues)<br />
            <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="blue">delegate string</font><span class="Apple-converted-space">&nbsp;</span>SetForeachEventHandler(<font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>text, object[] values, int row);<br />
            <font color="#0000ff">public<span class="Apple-converted-space">&nbsp;</span></font><font color="blue">event</font><span class="Apple-converted-space">&nbsp;</span><font color="teal">SetForeachEventHandler</font><span class="Apple-converted-space">&nbsp;</span>OnForeach;//针对每行进行格式化</strong></p>
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    <p style="margin: 10px auto; text-indent: 0px;">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px;">
        <font color="red">示例一：<font color="#000000">SetForeach(</font><font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span>id,<span class="Apple-converted-space">&nbsp;</span></font><font color="#0000ff">string</font></font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span>text, params object[] formatValues)</font></p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        原始标签：&lt;select id=&quot;selClassID&quot;&gt;&lt;/select&gt;</div>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        doc.LoadData(table);//加载表格<br />
        doc.SetForeach(&quot;selClassID&quot;, &quot;&lt;option value=&quot;{0}&quot; &gt;{1}&lt;/option&gt;&quot;, Class.ID, IsUserLang ? Class.Name : Class.PKey);</div>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        结果标签：&lt;select id=&quot;selClassID&quot;&gt;&lt;option value=&quot;1&quot;&gt;标识1&lt;/option&gt;....&lt;/select&gt;</div>
    <p style="margin: 10px auto; text-indent: 0px;">
        这语句将循环出一个下拉列表。</p>
    <p style="margin: 10px auto; text-indent: 0px;">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px;">
        <font color="red">示例二：</font>SetForeach(<font color="#0000ff">string</font><font color="#000000"><span class="Apple-converted-space">&nbsp;</span></font>id,<span class="Apple-converted-space">&nbsp;</span><font color="#008080">SetType</font><span class="Apple-converted-space">&nbsp;</span>setType, params object[] formatValues)<br />
    </p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <p style="margin: 10px auto; text-indent: 0px;">
            原始标签：&lt;select id=&quot;selClassID&quot;&gt;&lt;option value=&quot;{0}&quot; &gt;{1}&lt;/option&gt;&lt;/select&gt;</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            doc.SetForeach(&quot;selClassID&quot;, SetType.InnerXml,, Class.ID, IsUserLang ? Class.Name : Class.PKey);</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            结果标签：和上面一样。</p>
    </div>
    <p style="margin: 10px auto; text-indent: 0px;">
        &nbsp;</p>
    <p style="margin: 10px auto; text-indent: 0px;">
        <font color="red">示例三：</font>循环格式化：</p>
    <div class="cnblogs_code" style="word-wrap: break-word; background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: 'Courier New' !important; font-size: 12px !important; max-width: 98%;">
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
        <p style="margin: 10px auto; text-indent: 0px;">
            doc.OnForeach += new<span class="Apple-converted-space">&nbsp;</span><font color="teal">XHtmlAction</font>.SetForeachEventHandler(Document_OnForeach);</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            &nbsp;<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>Document_OnForeach(<font color="#0000ff">string</font><span class="Apple-converted-space">&nbsp;</span>text,<span class="Apple-converted-space">&nbsp;</span><font color="blue">object</font>[] values,<span class="Apple-converted-space">&nbsp;</span><font color="blue">int</font><span class="Apple-converted-space">&nbsp;</span>row)<br />
            &nbsp;{</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            &nbsp;&nbsp;//text为：&lt;option value=&quot;{0}&quot; &gt;{1}&lt;/option&gt;<br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values[0]=“2”;</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values[1]=“标识2”;</p>
        <p style="margin: 10px auto; text-indent: 0px;">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return text;<br />
            &nbsp;}</p>
        <div class="cnblogs_code_toolbar" style="word-wrap: break-word; margin-top: 5px; background-color: rgb(245, 245, 245);">
            <span class="cnblogs_code_copy" style="font-family: 'Courier New' !important; font-size: 12px !important; line-height: 1.5 !important; padding-right: 5px;"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" style="color: rgb(120, 175, 211); text-decoration: none; background-color: rgb(245, 245, 245) !important; border: none !important;" title="复制代码">
            <img alt="复制代码" src="http://common.cnblogs.com/images/copycode.gif" style="border: none !important; background-color: rgb(245, 245, 245) !important; max-width: 900px;" /></a></span></div>
    </div>
    </strong>
    <p style="margin: 10px auto; text-indent: 0px; color: rgb(0, 0, 0); font-family: 微软雅黑, PTSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: start; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
        <strong>结果标签：&lt;select id=&quot;selClassID&quot;&gt;&lt;option value=&quot;2&quot;&gt;标识2&lt;/option&gt;....&lt;/select&gt;</strong></p>

</body>
</html>
